﻿toggle = function (fsid)
{
    var div = $id("div_" + fsid);
    //var divImage = $id("divImage_" + fsid);
    //var btn = $id("btn_" + fsid);
    //var btnEdit = $id("btnEdit_" + fsid);
    //var load = $id("load_" + fsid);
        
    var display = "";
    
    if( div.style.display != "none" )
    {
        display = "none";
    }
    
    div.style.display = display;
    //divImage.style.display = display;
    //btn.style.display = display;
    //btnEdit.style.display = display;
    //load.style.display = display;
}

All = function()
{
    var lovhCAR = $id("lovh_CAR.ID");
    var lovCAR = $id("lov_CAR.ID");
    lovCAR.value = "";
    lovhCAR.value = "";
    dgSpoc_c.PerformCallback("ALL");
}
Sort = function()
{
    var btnSort = $id("btnSort").value;
    if(btnSort == "ASCENDING")
    {
        $id("btnSort").value = "DESCENDING";
    }
    else
    {
        $id("btnSort").value = "ASCENDING";
    }
    dgSpoc_c.PerformCallback("SORT" + DELIMITER + btnSort);
}
SelectCAR = function()
{
    var lovhCAR = $id("lovh_CAR.ID");
    var CAR = lovhCAR.value;
    dgSpoc_c.PerformCallback("FILTER" + DELIMITER + CAR);
}
dgSpoc_c_CallbackComplete = function(e) 
{
    var load = $id("load");
    var btn = $id("btnAll"); 
    load.style.display = "none";
    btn.style.display = "block";
}

